﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Core.Domain
{
    public class ProductItem : BaseItem
    {
        public string Name { get; set; }
        public decimal Amount { get; set; }

        public ProductItem(DataRow row)
        {
            if (row != null)
            {
                try
                {
                    if (row[Constants.ProductItem.Name] != null) Name = Convert.ToString(row[Constants.ProductItem.Name]).Trim();
                    if (row[Constants.ProductItem.Amount] != null) Amount = Convert.ToDecimal(row[Constants.ProductItem.Amount]);
                    if (row[Constants.ProductItem.OrderGUID] != null) OrderGUID = Convert.ToString(row[Constants.ProductItem.OrderGUID]).Trim();
                }
                catch { }
            }
        }    
    }
}
